Optimal. Leaf size=62 \[ \frac{b \log (x)}{a^2+1}-\frac{b \log \left ((a+b x)^2+1\right )}{2 \left (a^2+1\right )}-\frac{a b \tan ^{-1}(a+b x)}{a^2+1}-\frac{\tan ^{-1}(a+b x)}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.038679, antiderivative size = 62, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.7, Rules used = {5045, 371, 706, 31, 635, 203, 260} \[ \frac{b \log (x)}{a^2+1}-\frac{b \log \left ((a+b x)^2+1\right )}{2 \left (a^2+1\right )}-\frac{a b \tan ^{-1}(a+b x)}{a^2+1}-\frac{\tan ^{-1}(a+b x)}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5045
Rule 371
Rule 706
Rule 31
Rule 635
Rule 203
Rule 260
Rubi steps
\begin{align*} \int \frac{\tan ^{-1}(a+b x)}{x^2} \, dx &=-\frac{\tan ^{-1}(a+b x)}{x}+b \int \frac{1}{x \left (1+(a+b x)^2\right )} \, dx\\ &=-\frac{\tan ^{-1}(a+b x)}{x}+b \operatorname{Subst}\left (\int \frac{1}{(-a+x) \left (1+x^2\right )} \, dx,x,a+b x\right )\\ &=-\frac{\tan ^{-1}(a+b x)}{x}+\frac{b \operatorname{Subst}\left (\int \frac{1}{-a+x} \, dx,x,a+b x\right )}{1+a^2}+\frac{b \operatorname{Subst}\left (\int \frac{-a-x}{1+x^2} \, dx,x,a+b x\right )}{1+a^2}\\ &=-\frac{\tan ^{-1}(a+b x)}{x}+\frac{b \log (x)}{1+a^2}-\frac{b \operatorname{Subst}\left (\int \frac{x}{1+x^2} \, dx,x,a+b x\right )}{1+a^2}-\frac{(a b) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,a+b x\right )}{1+a^2}\\ &=-\frac{a b \tan ^{-1}(a+b x)}{1+a^2}-\frac{\tan ^{-1}(a+b x)}{x}+\frac{b \log (x)}{1+a^2}-\frac{b \log \left (1+(a+b x)^2\right )}{2 \left (1+a^2\right )}\\ \end{align*}
Mathematica [C] time = 0.0560829, size = 67, normalized size = 1.08 \[ -\frac{\tan ^{-1}(a+b x)}{x}+\frac{b (i (a+i) \log (-a-b x+i)+(-1-i a) \log (a+b x+i)+2 \log (x))}{2 \left (a^2+1\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.043, size = 63, normalized size = 1. \begin{align*} -{\frac{\arctan \left ( bx+a \right ) }{x}}-{\frac{b\ln \left ( 1+ \left ( bx+a \right ) ^{2} \right ) }{2\,{a}^{2}+2}}-{\frac{ab\arctan \left ( bx+a \right ) }{{a}^{2}+1}}+{\frac{b\ln \left ( bx \right ) }{{a}^{2}+1}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.54389, size = 104, normalized size = 1.68 \begin{align*} -\frac{1}{2} \, b{\left (\frac{2 \, a \arctan \left (\frac{b^{2} x + a b}{b}\right )}{a^{2} + 1} + \frac{\log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{a^{2} + 1} - \frac{2 \, \log \left (x\right )}{a^{2} + 1}\right )} - \frac{\arctan \left (b x + a\right )}{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.71557, size = 151, normalized size = 2.44 \begin{align*} -\frac{b x \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right ) - 2 \, b x \log \left (x\right ) + 2 \,{\left (a b x + a^{2} + 1\right )} \arctan \left (b x + a\right )}{2 \,{\left (a^{2} + 1\right )} x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 10.9512, size = 323, normalized size = 5.21 \begin{align*} \begin{cases} - \frac{i b^{2} x^{2} \operatorname{atan}{\left (b x - i \right )}}{2 b x^{2} - 4 i x} - \frac{4 b x \operatorname{atan}{\left (b x - i \right )}}{2 b x^{2} - 4 i x} - \frac{i b x}{2 b x^{2} - 4 i x} + \frac{4 i \operatorname{atan}{\left (b x - i \right )}}{2 b x^{2} - 4 i x} - \frac{2}{2 b x^{2} - 4 i x} & \text{for}\: a = - i \\\frac{i b^{2} x^{2} \operatorname{atan}{\left (b x + i \right )}}{2 b x^{2} + 4 i x} - \frac{4 b x \operatorname{atan}{\left (b x + i \right )}}{2 b x^{2} + 4 i x} + \frac{i b x}{2 b x^{2} + 4 i x} - \frac{4 i \operatorname{atan}{\left (b x + i \right )}}{2 b x^{2} + 4 i x} - \frac{2}{2 b x^{2} + 4 i x} & \text{for}\: a = i \\- \frac{2 a^{2} \operatorname{atan}{\left (a + b x \right )}}{2 a^{2} x + 2 x} - \frac{2 a b x \operatorname{atan}{\left (a + b x \right )}}{2 a^{2} x + 2 x} + \frac{2 b x \log{\left (x \right )}}{2 a^{2} x + 2 x} - \frac{b x \log{\left (a^{2} + 2 a b x + b^{2} x^{2} + 1 \right )}}{2 a^{2} x + 2 x} - \frac{2 \operatorname{atan}{\left (a + b x \right )}}{2 a^{2} x + 2 x} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11186, size = 95, normalized size = 1.53 \begin{align*} -\frac{1}{2} \, b{\left (\frac{2 \, a \arctan \left (b x + a\right )}{a^{2} + 1} + \frac{\log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{a^{2} + 1} - \frac{2 \, \log \left ({\left | x \right |}\right )}{a^{2} + 1}\right )} - \frac{\arctan \left (b x + a\right )}{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]